package com.zmn.oms.dubbo.interfaces.conf.cancel;

import com.zmn.common.dto.VtDTO;
import com.zmn.common.dto2.ResponseDTO;
import com.zmn.oms.common.dio.conf.cancel.reason.OrderCancelReasonDIO;
import com.zmn.oms.common.dro.conf.cancel.reason.OrderCancelReasonDRO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import java.util.List;

/**
 * 取消缘由
 *
 * @author  liuying
 * @date   2022/03/16 17:22
 */
@Api(value = "取消缘由服务", tags = {"取消缘由"})
public interface OrderCancelReasonListRemoteService {
    /**
     * 描述: 根据主键查询取消缘由
     *
     * @param id
     * @return OrderCancelCategoryDRO
     * @since: 2019/10/23 11:11
     */
    @ApiOperation(value = "根据主键查询取消缘由", response = ResponseDTO.class, notes = "", tags = {"取消缘由"})
    ResponseDTO<OrderCancelReasonDRO> getById(@NotNull(message = "主键id不能为空") @Positive(message = "主键id必须为大于0的正整数") @ApiParam(value = "主键id", required = true) Integer id);

    /**
     * 描述: 根据条件查询取消缘由
     *
     * @param orderCancelCategoryDIO
     * @return OrderCancelCategoryDRO
     * @since: 2019/10/23 11:11
     */
    @ApiOperation(value = "根据条件查询取消缘由", response = ResponseDTO.class, notes = "", tags = {"取消缘由"})
    ResponseDTO<List<OrderCancelReasonDRO>> listByQuery(@NotNull(message = "入参不能为空") @Valid @ApiParam(value = "查询条件", required = true) OrderCancelReasonDIO orderCancelCategoryDIO);

    /**
     * 描述：根据状态取得二级取消原因
     *
     * @param status 状态
     * @return ResponseDTO<List>
     * @see OrderCancelReasonListRemoteService#listLevelVtByStatus(Integer, Integer)
     */
    @Deprecated
    @ApiOperation(value = "根据状态取得二级取消原因", response = ResponseDTO.class, notes = "", tags = {"状态", "取消缘由"})
    ResponseDTO<List<VtDTO>> listVtByStatus(@NotNull(message = "状态不能为空") @Positive(message = "状态必须为大于0的正整数") @ApiParam(value = "状态", required = true) Integer status);

    /**
     * 描述：根据状态取得取消原因，level 1 一级缘由 2二级缘由，一二级之间不存在从属关系，是同一条数据
     *
     * @param status 状态
     * @return ResponseDTO<List>
     */
    @ApiOperation(value = "根据状态取得取消原因", response = ResponseDTO.class, notes = "", tags = {"状态", "取消缘由"})
    ResponseDTO<List<VtDTO>> listLevelVtByStatus(@NotNull(message = "状态不能为空") @Positive(message = "状态必须为大于0的正整数") @ApiParam(value = "状态", required = true) Integer status,
                                                 @NotNull(message = "级别不能为空") @Positive(message = "级别必须为大于0的正整数") @ApiParam(value = "级别", required = true) Integer level);
}
